
volatile.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <square>:
#include <stdio.h>

int square(volatile int *ptr)
{
   0:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
   4:	e28db000 	add	fp, sp, #0
   8:	e24dd00c 	sub	sp, sp, #12
   c:	e50b0008 	str	r0, [fp, #-8]
	return *ptr * *ptr;
  10:	e51b3008 	ldr	r3, [fp, #-8]
  14:	e5933000 	ldr	r3, [r3]
  18:	e51b2008 	ldr	r2, [fp, #-8]
  1c:	e5922000 	ldr	r2, [r2]
  20:	e0030392 	mul	r3, r2, r3
}
  24:	e1a00003 	mov	r0, r3
  28:	e24bd000 	sub	sp, fp, #0
  2c:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
  30:	e12fff1e 	bx	lr

00000034 <square_compile>:

int square_compile(volatile int *ptr)
{
  34:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
  38:	e28db000 	add	fp, sp, #0
  3c:	e24dd014 	sub	sp, sp, #20
  40:	e50b0010 	str	r0, [fp, #-16]
	int a, b;
	a = *ptr;
  44:	e51b3010 	ldr	r3, [fp, #-16]
  48:	e5933000 	ldr	r3, [r3]
  4c:	e50b3008 	str	r3, [fp, #-8]
	b = *ptr;
  50:	e51b3010 	ldr	r3, [fp, #-16]
  54:	e5933000 	ldr	r3, [r3]
  58:	e50b300c 	str	r3, [fp, #-12]
	
	return a * b;
  5c:	e51b3008 	ldr	r3, [fp, #-8]
  60:	e51b200c 	ldr	r2, [fp, #-12]
  64:	e0030392 	mul	r3, r2, r3
}
  68:	e1a00003 	mov	r0, r3
  6c:	e24bd000 	sub	sp, fp, #0
  70:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
  74:	e12fff1e 	bx	lr

00000078 <square_modify>:

int square_modify(volatile int *ptr)
{
  78:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
  7c:	e28db000 	add	fp, sp, #0
  80:	e24dd014 	sub	sp, sp, #20
  84:	e50b0010 	str	r0, [fp, #-16]
	int a;
	a = *ptr;
  88:	e51b3010 	ldr	r3, [fp, #-16]
  8c:	e5933000 	ldr	r3, [r3]
  90:	e50b3008 	str	r3, [fp, #-8]
	
	return a * a;
  94:	e51b3008 	ldr	r3, [fp, #-8]
  98:	e51b2008 	ldr	r2, [fp, #-8]
  9c:	e0030392 	mul	r3, r2, r3
}
  a0:	e1a00003 	mov	r0, r3
  a4:	e24bd000 	sub	sp, fp, #0
  a8:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
  ac:	e12fff1e 	bx	lr

000000b0 <main>:

int main()
{
  b0:	e92d4800 	push	{fp, lr}
  b4:	e28db004 	add	fp, sp, #4
  b8:	e24dd008 	sub	sp, sp, #8
	int a = 3;
  bc:	e3a03003 	mov	r3, #3
  c0:	e50b300c 	str	r3, [fp, #-12]
	int b;
	
	b = square(&a);
  c4:	e24b300c 	sub	r3, fp, #12
  c8:	e1a00003 	mov	r0, r3
  cc:	ebfffffe 	bl	0 <square>
  d0:	e50b0008 	str	r0, [fp, #-8]
	printf("%d\n", b);
  d4:	e51b1008 	ldr	r1, [fp, #-8]
  d8:	e59f0048 	ldr	r0, [pc, #72]	; 128 <main+0x78>
  dc:	ebfffffe 	bl	0 <printf>
	
	b = square_compile(&a);
  e0:	e24b300c 	sub	r3, fp, #12
  e4:	e1a00003 	mov	r0, r3
  e8:	ebfffffe 	bl	34 <square_compile>
  ec:	e50b0008 	str	r0, [fp, #-8]
	printf("%d\n", b);
  f0:	e51b1008 	ldr	r1, [fp, #-8]
  f4:	e59f002c 	ldr	r0, [pc, #44]	; 128 <main+0x78>
  f8:	ebfffffe 	bl	0 <printf>
	
	b = square_modify(&a);
  fc:	e24b300c 	sub	r3, fp, #12
 100:	e1a00003 	mov	r0, r3
 104:	ebfffffe 	bl	78 <square_modify>
 108:	e50b0008 	str	r0, [fp, #-8]
	printf("%d\n", b);
 10c:	e51b1008 	ldr	r1, [fp, #-8]
 110:	e59f0010 	ldr	r0, [pc, #16]	; 128 <main+0x78>
 114:	ebfffffe 	bl	0 <printf>
	
	return 0;
 118:	e3a03000 	mov	r3, #0
}
 11c:	e1a00003 	mov	r0, r3
 120:	e24bd004 	sub	sp, fp, #4
 124:	e8bd8800 	pop	{fp, pc}
 128:	00000000 	.word	0x00000000
